unsigned char Kart_start()
{
if(RF_A==0);
delay_ms(500);
if(RF_B==1);
delay_ms(500);
if(RF_A==1);
delay_ms(500);
if(RF_B==0);
delay_ms(500);
return(SUCCESS);
}

unsigned char Kart_Dish()
{
delay_ms(500);
if(RF_A==0)
{
if(RF_B==1)
return(1);
if(RF_C==1)
return(2);
if(RF_D==1)
return(3);
}
}

unsigned char Kart_Quantity()
{
unsigned char count=0;
delay_ms(500);
if(RF_A==1)
{
if(RF_B==SELECT)
{count+=4;}
if(RF_C==1)
{count+=2;}
if(RF_D==1)
{count+=1;}
}
return(count);
}

void main()
{
unsigned char test;
while(1)
{
test=Kart_start();
if(test==SUCCESS)
{
Enter Dish:
Kart_Dish();
Enter Quantity:
Kart_Quantity();
}
}
}

